package funjava;

import java.math.BigInteger;

/**
 * Created by judasnow on 5/11/16.
 */
public class C1_6 {
    // 计算 n!
    public static BigInteger c1_6(int n) {
        if (n == 1) {
            return BigInteger.valueOf(1);
        } else {
            return BigInteger.valueOf(n).multiply(c1_6(n - 1));
        }
    }
    public static int c1_6_2(int n) {
        if (n == 1) {
            return 1;
        } else {
            return n * c1_6_2(n-1);
        }
    }
    public static void main(String[] args) {
        System.out.print(c1_6(1000));
    }
}
